home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2025 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.5 KB

  1. Path: news.uh.edu!usenet
  2. From: Sensarn <txs53132@bayou.uh.edu>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Help:Memory allocation above 64kbytes
  5. Date: 15 Jan 1996 14:59:42 GMT
  6. Organization: AEtna Insurance Agency
  7. Message-ID: <4ddq4u$9pv@masala.cc.uh.edu>
  8. References: <30FA67A9.31CC@mj.org.za>
  9. NNTP-Posting-Host: sip-14271.public-dialups.uh.edu
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.1 (Windows; U; 16bit)
  14.  
  15. Wayne Cawood <wcawood@mj.org.za> wrote:
  16. >Dear Intellectual!
  17. >
  18. >I am in desperate need of advice on how to combat the problem of 
  19. >addressing memory above 64000 bytes. Nothing I do works. I know the 
  20. >borland c++ 3.1 compiler should be able to but I am completely confused 
  21. >as to why my computer (and others which I have tried on), bomb OUT when 
  22. >I attempt to write to this memory.
  23. >
  24. >Here's some code to illustrate the problem.
  25. >
  26. >#inlcude <etc>  // If there are any special header files please mention 
  27. >them
  28. >
  29. >typedef char buffer[64000];
  30. >
  31. >void main()
  32. >{
  33. >char far *BUF;
  34. >
  35. >BUF = (char far *)new buffer;
  36. >
  37. >}
  38. >
  39. Use farmalloc (includes malloc.h).  Make sure you go into the 
  40. OPTIONS/DEBUGGER menu and change the PROGRAM HEAP SIZE from 64k to 
  41. something larger (like 640k).
  42.  
  43. >This allocates the memory, but when I try to write to memory, my system 
  44. >shuts down. Please Help! ANYBODY!!!!
  45. >How do I address the EMS,XMS or what ever MS I am supposed to use!
  46. >I have 8megs of extended memory and I can't use it!! How frustrating!!
  47. >
  48. >Thanks in advance!
  49. >Craig Haworth (Games programmer in training)
  50.  
  51.  
  52.